<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template('member', 'header'); ?>
<?php
$CATEGORYS = getcache('category_content_1','commons');
$MODEL = getcache('model','commons');
?>
<div class="layui-member-center">
  <?php include template('member', 'left'); ?>
  <div class="layui-member-info">
  	<div class="layui-member-favorite">
    	<div class="layui-title"><h3>我的收藏</h3></div>
  		<ul class="layui-favorite-list">
  	  	<?php $n=1; if(is_array($favoritelist)) foreach($favoritelist AS $k => $v) { ?>
      	<?php $db = pc_base::load_model('content_model');$db->table_name = $db->db_tablepre.$MODEL[$v['modelid']]['tablename'];$_r = $db->get_one(array('id'=>$v['contentid']));?>
  	  		<li>
  	  			<a href="<?php echo $_r['url'];?>" title="<?php echo $_r['title'];?>" target="_blank"><img src="<?php echo $_r['thumb'];?>?x-oss-process=style/smallpic" alt="<?php echo $_r['title'];?>" /></a>
  	  			<div class="favorite-title"><h3><?php echo $_r['title'];?></h3><a class="layui-btn" href="index.php?m=member&c=index&a=favorite&id=<?php echo $v['id'];?>"><?php echo L('delete');?></a></div></li>
  	  	<?php $n++;}unset($n); ?>
  		</ul>
		<div class="layui-pagebox">
    		<div class="layui-laypage"><?php echo $pages;?></div>
  		</div>
  	</div>
  </div>
</div>
<?php include template('member', 'footer'); ?>